#ifndef IMU_DRIVER_H_
#define IMU_DRIVER_H_

//include
#include "matrix.h"


typedef float imu_data;

struct euler_angle 
{
    imu_data pitch;
    imu_data yaw;
    imu_data roll;
};

struct imu 
{
    imu_data gx;
    imu_data gy;
    imu_data gz;
    imu_data ax;
    imu_data ay;
    imu_data az;
    imu_data dt;
    struct euler_angle  e_angle;
    struct euler_angle  v_angle;
};


struct efk
{
    struct matrix X;
    struct matrix Q;
    struct matrix R;
    struct matrix P;
};
extern struct imu imu_0;
void efk_init (void);
void imu_cala(void);

#endif
